package devops.katas.adminservice;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Arrays;
import java.util.List;

@SpringBootApplication
public class AdminserviceApplication {

	public static void main(String[] args) {
		SpringApplication.run(AdminserviceApplication.class, args);
	}

}

@RestController
class AdminController {
	@GetMapping("/admins")
	ResponseEntity<List<String>> admins() {
		return ResponseEntity.status(200).body(Arrays.asList("Tom", "Jerry"));
	}
}